﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PineLake.Drmwe.Encrypts.AES
{
    /// <summary>
    /// AES加密/解密 接口
    /// </summary>
    public interface IAES
    {
        /// <summary>
        /// 默认AES加密
        /// </summary>
        /// <param name="EncryptStr">加密字符串</param>
        /// <returns></returns>
        string Encrypt(string EncryptStr);

        /// <summary>
        /// 加密
        /// </summary>
        /// <param name="EKey">密钥</param>
        /// <param name="EIV">向量IV</param>
        /// <param name="EncryptBytes">加密字符串数组</param>
        /// <returns></returns>
        string Encrypt(string EKey, string EIV, byte[] EncryptBytes);

        /// <summary>
        /// 默认AES解密
        /// </summary>
        /// <param name="DncryptStr">默认字符串</param>
        /// <returns></returns>
        string Decrypt(string DncryptStr);

        /// <summary>
        /// 解密
        /// </summary>
        /// <param name="DncryptStr">解密字符串</param>
        /// <param name="EKey">密钥</param>
        /// <param name="EIV">向量IV</param>
        /// <returns></returns>
        byte[] Decrypt(string DncryptStr, string EKey, string EIV);
    }
}
